// src/renderer/router/index.js

import {
	createRouter,
	createWebHashHistory
} from 'vue-router'
export const Layout = () => import("../layout/index.vue")

export const routes = [{
	path: "/",
	component: Layout,
	redirect: 'dashboard',
	children: [
		{
			path: 'dashboard',
			name: 'Dashboard',
			component: () => import('../views/Dashboard.vue'),
			meta: {
				title: '项目',
				icon: 'Monitor'
			}
		},
		{
			path: 'gallery',
			name: 'Gallery',
			component: () => import('../views/Gallery.vue'),
			meta: {
				title: '图库',
				icon: 'Tickets'
			}
		},
		{
			path: 'images',
			name: 'Images',
			component: () => import('../views/Images.vue'),
			meta: {
				title: '图像',
				icon: 'PictureFilled'
			}
		},
		{
			path: 'inspect',
			name: 'Inspect',
			component: () => import('../views/Inspect.vue'),
			meta: {
				title: '检查',
				icon: 'SetUp'
			}
		},
		{
			path: 'split',
			name: 'Split',
			component: () => import('../views/Split.vue'),
			meta: {
				title: '拆分',
				icon: 'DocumentRemove'
			}
		},{
			path: 'educate',
			name: 'Educate',
			component: () => import('../views/Educate.vue'),
			meta: {
				title: '训练',
				icon: 'TrendCharts'
			}
		},
		{
			path: 'assessment',
			name: 'Assessment',
			component: () => import('../views/Assessment.vue'),
			meta: {
				title: '评估',
				icon: 'Document'
			}
		},
		{
			path: 'export',
			name: 'Export',
			component: () => import('../views/Export.vue'),
			meta: {
				title: '导出',
				icon: 'Document'
			}
		},
		{
			path: 'help',
			name: 'Help',
			component: () => import('../views/Help.vue'),
			meta: {
				title: '帮助',
				icon: 'QuestionFilled'
			}
		},
		{
			path: 'training',
			name: 'ModelTraining',
			component: () => import('../views/ModelTraining.vue'),
			hidden: true,
			meta: {
				title: '模型训练'
			}
		}
	]
}]
const router = createRouter({
	history: createWebHashHistory(), // 使用 Hash 模式以兼容 Electron
	routes
})

export default router